package org.NooLab.docserver.properties;

import java.io.Serializable;

import org.NooLab.docserver.util.FileOrganizer;



import com.jamesmurty.utils.XMLBuilder;



public class PersistenceSettings implements Serializable{

	private static final long serialVersionUID = -2361104769448054255L;

	String pathToSomFluidSystemRootDir = "";

	private String projectName = "";
	
	transient FileOrganizer fileOrganizer ;

	
	// ========================================================================
	public PersistenceSettings(FileOrganizer fileOrg){
		fileOrganizer = fileOrg;
	}

	// ========================================================================

	
	
	/**
	 * @return the pathToSomFluidSystemRootDir
	 */
	public String getPathToSomFluidSystemRootDir() {
		return pathToSomFluidSystemRootDir;
	}


	/**
	 * @param pathToSomFluidSystemRootDir the pathToSomFluidSystemRootDir to set
	 */
	public void setPathToSomFluidSystemRootDir(String pathToSomFluidSystemRootDir) {
		this.pathToSomFluidSystemRootDir = pathToSomFluidSystemRootDir;
		fileOrganizer.update();
	}


	public void setProjectName(String string) {
		 
		projectName = string;
		
		String froot ;
		
		froot = this.pathToSomFluidSystemRootDir;
		
		froot = fileOrganizer.getRootDir();
		if (froot.length()==0){
			
		}
		fileOrganizer.update();
	}


	/**
	 * @return the projectName
	 */
	public String getProjectName() {
		return projectName;
	}

	
	
	
	
}
